<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>收件箱管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.1.min.js"></script>
	<script src="<%=basePath%>/js/table.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/checkbox1.js" type="text/javascript"></script>
	<script src="<%=basePath%>/js/oa.js" type="text/javascript"></script>
	<script type="text/javascript" src="<%=basePath%>/js/My97DatePicker/WdatePicker.js" defer="defer"></script><base target="_self" />
	<script type="text/javascript" src="<%=basePath%>/js/dbdialog/lhgdialog.min.js<%=Util.LHGDIALOG%>"></script>
	
  </head>
  <script type="text/javascript">
		$(function() {
			//设置全选,反选,清空按钮事件
			selectButtonsEvent();
			$("#del").click(function () {
				batchDelete('<%=basePath%>/oa/mail_inMailDele.action?forward=2&keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }&num=${page.num }&size=${page.size }&ids=',2);
			});
			$("#del_shift").click(function () {
				batchDelete('<%=basePath%>/oa/mail_inMailDrop.action?forward=2&keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }&num=${page.num }&size=${page.size }&ids=',1);
			});
		});
		
	</script>
  <body>
  	<div class="body-box">
  		<div class="map">
			<div class="map_con">
				您当前的位置：协同办公 &gt; 邮件管理 &gt; 收件箱
			</div>
		</div>
		<div id="container">
			<div class="top_search">
			    <fieldset>
					<legend>
				  		<div class="search">查询条件</div>
				  	</legend>
				    <form action="<%=basePath%>/oa/mail_inMailList.action?search=1" method="post">
				    	发送时间：<input name="beginTime" id="time1" class="Wdate" type="text" value="${beginTime }" readonly="readonly" onClick="WdatePicker({maxDate:'#F{$dp.$D(\'time2\')}'})"/>--<input name="endTime" id="time2" class="Wdate" readonly="readonly" type="text" value="${endTime }" onClick="WdatePicker({minDate:'#F{$dp.$D(\'time1\')}'})"/>
				    	邮件标题：<input type="text" name="keyWord" value="${keyWord}">
				    	<input type="submit" value="搜 索" class="link_input" name="btnsx">
				    </form>
				</fieldset>
			</div>
		    <table border="0" cellpadding="0" cellspacing="0" class="mytable">
		    	 <tr class="fixedHeaderTr">
		    		<th width="10%">选择</th>
		    		<th width="10%">序列</th>
		    		<th width="10%">发件人</th>
		    		<th width="45%">标题</th>
		    		<th width="15%">时间</th>	    		
		    		<th width="10%">是否已读</th>	    		
		    	</tr>
		    	<s:if test="%{inMailList.size>0}">
		    		<s:iterator value="inMailList" id="mail" status="x">
				    	<tr>
				    		<td align="center"><input type="checkbox" name="ids" value="${mail.id }"/> </td>
				    		<td align="center">${x.index+1+(page.num-1)*page.size}</td>			    		
				    		<td align="center">${mail.tbOaMail.tbUser.userRealName}</td>
				    		<td align="center"><a href="javascript:mail_operate('2','${mail.id }','<%=basePath%>','&str_num=${page.num }&str_size=${page.size }&keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }');">${mail.tbOaMail.mailTitle}</a><s:if test="%{#mail.tbOaMail.isExigence==1}"><font color="red">【紧急】</font></s:if></td>
				    		<td align="center"><s:date name="#mail.tbOaMail.mailTime" format="yyyy-MM-dd HH:mm"/>（${mail.tbOaMail.mailWeek }） </td>				    		
				    		<td align="center">${mail.isRead==1?'<font color="green">已读</font>':'<font color="red">未读</font>' } </td>				    		
				    	</tr>
		    		</s:iterator>
			    </s:if>
			    <s:else>
			    	<tr><td colspan="6">收件箱  没有任何邮件</td></tr>
			    </s:else>
		    </table>
		    <div class="btn_page">
		    	<input type="button" id="all" name="all" value=" 全 选 "   class="link_input">
				<input type="button" id="rev" name="rev" value=" 反 选 "   class="link_input">
				<input type="button" id="empty" name="empty" value=" 清 空 "   class="link_input">
				<input type="button" id="del" name="del" value=" 删 除 "  class="link_input">
				<input type="button" id="del_shift" name="del_shift" value=" 彻底删除 "   class="link_input">
		  	</div>
		    <div class="page">
		    	<jsp:include flush="true" page="../share/fenye.jsp">
				    <jsp:param name="url4page" value="/oa/mail_inMailList.action?keyWord=${keyWord}&beginTime=${beginTime }&endTime=${endTime }" />
			    </jsp:include>
		    </div>
		    
		</div>
		<div class="right_bottom">
			<div style="width:11px;float:left"><img src="<%=basePath%>/images/right_bottom.gif"/></div>
			<div style="width:16px;float:right"><img src="<%=basePath%>/images/right_rbottom.gif"/></div>
		</div>
	</div>
  </body>
  <s:if test="%{deleOk}">
	  <SCRIPT type="text/javascript">msgDialog('已成功将邮件移除到"已删除"文件夹！', 'i.png'); </SCRIPT>
  </s:if>
  <s:if test="%{dropOk}">
	  <SCRIPT type="text/javascript">msgDialog('已成功将邮件删除！', 'i.png'); </SCRIPT>
  </s:if>
</html>
